package Month07.day31;

import java.io.File;

public class test2 {
    public static void main(String[] args) {
        File file = new File("D:\\Idea-Project\\basic\\basic\\src\\Month07\\day31");
//        File[] files = file.listFiles();
        getname(file);
    }
    private static void getname(File file) {
        File[] files = file.listFiles();
        if (files!=null){
            for (File path : files) {
                if (path.isFile()){
                    System.out.println(path.getName());
                }else {
                    getname(path);
                }
            }
        }
    }
}
